#include<vector>
using namespace std;

class Solution {
public:
    bool increasingTriplet(vector<int>& nums) {
        if (nums.size() < 3) return false;
        int small = INT32_MAX;
        int mid = INT32_MAX;
        for (int i = 0; i < nums.size(); ++i) {
            if (nums[i] < small) small = nums[i];
            else if (nums[i]>small&&nums[i] < mid) mid = nums[i];
            else if (nums[i] > mid) return true;
        }
        return false;
    }
};